<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>监理服务系统</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--JQ-->
    <script type="text/javascript" charset="utf-8"
            src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
    <!--Layui-->
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/common/js/comment.js" charset="utf-8"></script>
    <!--进度条-->
    <style>
        .layui-table-cell{
            height:46px;
            line-height: 46px;
        }
    </style>
</head>

<body>
<!--容器-->

<div class="container index clearfix">
    <!--右侧内容-->
    <div class="Right fr" style="width: 100%;">
            <div class="module whitebg" style="height:470px">
                <h2 align="center">${dto.title}</h2>
                <h3 align="left"  style="margin-left: 20px;">项目名称：${pro.projectName}</h3>
                <div>
                    <table style="border: 1px solid red;width: 100%;margin-top: 10px;">
                        <tr style="background: #F1F4FB;border: 1px solid lightgrey;">
                            <td colspan="4" style="padding-left: 20px;">甲方</td>
                        </tr>
                        <#list leaderlist as vo>
                            <tr style="border: 1px solid red" >
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.companyname}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.realname}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.username}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.password}</td>
                            </tr>
                        </#list>
                    </table>

                    <table style="border: 1px solid red;width: 100%;margin-top: 40px;">
                        <tr style="background: #F1F4FB;border: 1px solid lightgrey;">
                            <td colspan="4" style="padding-left: 20px;">乙方</td>
                        </tr>
                        <#list cjlist as vo>
                            <tr style="border: 1px solid red" >
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.companyname}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.realname}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.username}</td>
                                <td style="border: 1px solid lightgrey; text-align: center;">${vo.password}</td>
                            </tr>
                        </#list>
                    </table>
                </div>

            </div>
    </div>
</div>
<!--公用样式JS-->
<script type="text/javascript" src="${re.contextPath}/plugin/tools/tool.js"></script>
<script type="text/javascript" src="${re.contextPath}/plugin/tools/cardUtils.js"></script>

<script type="text/html" id="toolBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a>
</script>

<script>
    var element = "";
    var layer;
    var tableIns;
    function query() {
        table.reload('projectList', {
            where: {
                province: $('#province').val(),
                city: $('#city').val(),
                county: $('#county').val(),
                projectRole: $('#proRole').val(),
                hyType: $('#hyType').val(),
                projectType: $('#proType').val(),
                htMoneyMin: $('#htMoneyMin').val(),
                htMoneyMax: $('#htMoneyMax').val(),
                tzMoneyMin: $('#tzMoneyMin').val(),
                tzMoneyMax: $('#tzMoneyMax').val()
            }
        });
    }

    function getCity(e) {
        if(!$(e).val()){
            $("#city").empty();
            $("#city").append("<option value=''>" + "请选择" + "</option>");
            $("#county").empty();
            $("#county").append("<option value=''>" + "请选择" + "</option>");
            form.render('select');
        }
        $.ajax({
            cache: true,
            type: "get",
            url: "/sys/register/getCity",
            data: {"code": $(e).val()},
            success: function (data) {
                if(data.flag){
                    $("#city").empty();
                    $("#county").empty();
                    $("#city").append("<option value=''>" + "请选择" + "</option>");
                    $("#county").append("<option value=''>" + "请选择" + "</option>");
                    for (var i = 0; i < data.data.length; i++) {
                        $("#city").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
                    }
                    form.render('select');
                }
            }, error: function (error) {
                console.log(error);
                return;
            }
        })
    }


    function getCounty(e) {
        if(!$(e).val()){
            $("#county").empty();
            $("#county").append("<option value=''>" + "请选择" + "</option>");
            form.render('select');
        }
        $.ajax({
            cache: true,
            type: "get",
            url: "/sys/register/getCity",
            data: {"code": $(e).val()},
            success: function (data) {
                if(data.flag){
                    $("#county").empty();
                    $("#county").append("<option value=''>" + "请选择" + "</option>");
                    for (var i = 0; i < data.data.length; i++) {
                        $("#county").append("<option value='" + data.data[i].code + "'>" + data.data[i].name + "</option>");
                    }
                    form.render('select');
                }
            }, error: function (error) {
                console.log(error);
                return;
            }
        })
    }

    $(function () {
        layui.use(['table', 'element'], function () {
            table = layui.table;
            //方法级渲染
            tableIns = table.render({
                id: 'projectList',
                elem: '#projectList',
                url: '/sys/statistics/showProjectList',
                parseData: function(res){
                    if(res && res.length >= 0){
                        return {
                            "code": 0,
                            "msg": "加载成功",
                            "count": res.length,
                            "data":res
                        }
                    }
                },
                cols: [[
                    // {title: '统计项目', width: '5%',field: 'subject'},
                    {title: '统计项目', field: 'subject', width: '50%', sort: false},
                    {title: '统计数据', field: 'data', width: '50%', sort: false}
                ]],
            });
        })
    })
        </script>
    </body>
</html>